{% extends "./base.html" %}
{% block title %}Add New Item{% endblock %}
{% block content %}
{% if returnto -%}
	<a class="btn btn-primary" href={{ returnto }}>Return to previous page</a>
{%- endif %}
<table id="item">
	<tbody>
		<tr class="table">
			<td class="span4" rowspan="3">
				{% if user.photo %}				
				<a href="{{ uri.addParams(action='upload') }}"><img src="{{ uri.absPath('serve', user.photo.key()) }}" alt="{{ user_obj.getName() }}"></a></td>
				{% else %}
				<a href="{{ uri.addParams(action='upload') }}"><img src="http://placehold.it/225x225" alt="{{ user_obj.getName() }}"></a></td>
				{% endif %}
			<td class="span4"> <h3>Name: {{ user_obj.getName() }} </h3></td>
		</tr>
		<tr>
			<td class="span4"> <h5>Email:  {{ user_obj.email }} </h5></td>
		</tr>
		<tr>
			<td colspan="3"> <h6>Info: {{ user_obj.info }} </h6></td>
		</tr>
		<tr>
			{% if user %}
			<td><a class="btn btn-primary" href="{{ uri.addParams(action='edit') }}">Edit</a></td>
			<td>
				<form action="" method="post" style="display:inline">
					<input type="hidden" name="action" value="delete" />
					<input class="btn btn-primary" type="submit" value="Delete" />
				</form>
			</td>
			{% endif %}
	</tbody>
</table>
{% endblock %}
